<?php
defined( '_SYS' ) or die( 'No direct script access allowed' );
/*
 * 检测
 */
//@set_magic_quotes_runtime( 0 );
//@ini_set('zend.ze1_compatibility_mode', '0');
PHP_VERSION >= '5.1' && date_default_timezone_set('PRC');
//Date
//PHP_VERSION >= '5.1' && date_default_timezone_set('Asia/Shanghai');
@ini_set('session.gc_probability',70);    //和session.gc_divisor一起构成清除垃圾的执行几率
@ini_set('session.gc_divisor',100);
/*
 * 安装检测
 */
define('ROOT_PATH', str_replace('feedback/includes/framework.php', '', str_replace('\\', '/', __FILE__)));
//echo ":::::" . ROOT_PATH . "\n";
if (!file_exists( ROOT_PATH . 'data/install.lock' ) ) {
	if( file_exists( PATH_INSTALLATION . DS . 'index'.EXT ) ) {
		header( 'Location: '.SITEURL.'/install/index.php' );
		exit();
	} else {
		echo 'No installation code available. Exiting...';
		exit();
	}
}
/*
 * 初始化
 */
require( PATH_LIBRARIES.DS.'loader'.EXT);
if (floor(phpversion()) < 5)
{
	require(PATH_LIBRARIES.DS.'system/base4'.EXT);
}
else
{
	require(PATH_LIBRARIES.DS.'system/base5'.EXT);
}
$SYS = &get_instance();
$SYS->loader = new C_loader();
$SYS->loader->_sys_autoloader();
require(PATH_LIBRARIES.DS.'system'.DS.'compat'.EXT);
require_once ( PATH_LIBRARIES.DS.'system'.DS.'core'.EXT);
?>
